<?php

namespace App\Providers;

use App\Services\SmsCodeService;
use App\Services\SmsService;
use Illuminate\Support\ServiceProvider;

class SmsServiceProvider extends ServiceProvider
{

    protected $defer = true;

    /**
     * Bootstrap the application services.
     *
     * @return void
     */
    public function boot()
    {
        //
    }

    /**
     * Register the application services.
     *
     * @return void
     */
    public function register()
    {
        $this->app->singleton('sms', function () {
            return $this->app->make(SmsService::class);
        });

        $this->app->singleton('sms.code', function () {
            return $this->app->make(SmsCodeService::class);
        });
    }

    /**
     * provides
     *
     * @return string[]
     */
    public function provides()
    {
        return ['sms', 'sms.code'];
    }
}
